package com.jackrain.nea.omslocal.Dao;

import com.alibaba.fastjson.JSONObject;
import com.jackrain.nea.omslocal.conf.LoadCloumnsConfig;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * @Discription: 消费线上修改字段消息, 改变字段
 * Created with IntelliJ IDEA.
 * @Author cs
 * @Date 2017/5/26 9:41
 */
@Component
@Slf4j
public class TableCloumnsDao {

    @Autowired
    private LoadCloumnsConfig loadCloumnsConfig;


    public void changeCloumns(JSONObject jsonObject, String msgKey, String topic) {
        String tableName = jsonObject.getString("tablename");
        String insertCols = jsonObject.getString("insertcols");
        String updateCols = jsonObject.getString("updatecols");
        LoadCloumnsConfig.insertcolsmap.put(tableName, insertCols);
        LoadCloumnsConfig.updatecolsmap.put(tableName, updateCols);

    }


}
